006 basic controls
好吧,我希望你已经准备好进行一些沟通,因为我们回来了,这就是我们来这里要做的。
All right I hope you're ready for some communication because we are back and that's what we came to do.
那么我们想要拥有什么。
So what do we want to have.
我们想要让我们的 RSS 链接运行检查 我们已经知道我们想要通过我们的程序设置检查来模拟运行。
We want to have our RSS links running check We've got that we want to have emulate running with our program set up check.
我们要确保我们的通道 0 数据高速公路已建立以进行 CRC 检查。
We want to make sure that our channel 0 data highway is set up on come to CRC check.
然后我们希望我们的 PLCC 程序启动并运行。
Then we would would like to have our PLCC program up and running.
因此,我将继续将其上线,然后将其置于运行模式检查。
So I'm going to go ahead and put that on line and then put it into run mode check.
到目前为止一切都很好。
All good so far.
最后但并非最不重要的一点是我们要确保它为 0。
And last but not least we want to make sure it comes 0.
Com 正在运行,并且像往常一样连接到来,因此我们可以将其最小化。
Com is running and it's connecting to to come for like always so we can just minimize that.
然后,为了预期我将要设置的内容,我将进入我的“审核”选项卡,然后我将继续切换此位以将我的所有设备置于自动模式。
And then just in anticipation of what I'm about to set up I'm going to come in here to my Review tab and I'm going to go ahead and toggle this bit to put all my devices into auto mode.
所以现在如果我设置一个按钮来启动系统,它将开始运行。
So now if I set up a button to start the system it will start running.
这就是我现在正在尝试做的事情,我正在尝试设置一些控件。
So that's what I'm trying to do now I'm trying to set up some controls.
所以我想写成三三三。
So I want to write to be three three three.
这将是我的第一步。
That's going to be my first step.
那么让我们回到简易构建器。
So let's go back into easy builder.
我将在这里显示两个对象,让我们继续并按另一个按钮,您会看到我这里有一些不同的东西,但我将只为我的描述选择一组。
I'm going to come up here two objects and let's go ahead and take another button and you see I've got a handful of different things here but I'm just going to take set bit for my description.
我真的不会在这里添加描述,因为它确实对我们没有任何作用,但 PLCC 名称将是我们的 Alan Bradley,我将单击此处的设置,然后单击标签库并查看在那。
I'd really never put in a description in here because it really doesn't do anything for us but for PLCC name that's going to be our Alan Bradley and I'm going to click on settings here and then click on tag library and look at that.
您还记得在之前的讲座中,我们正在创建已经创建的标签或开始按钮。
You remember from an earlier lecture where we were creating tags we already created or start button.
所以我只需单击“确定”,再次单击“确定”,然后我们就有了设定的样式。
So I'm just going to click OK click OK again and then we have a set style.
嗯,这就是我们的按钮确实有很多很多功能的地方。
Well this is where we really have lots and lots and lots of functionality for our buttons.
所以这是枫树系统通过 Easy Builder 5000 做得非常好的一件事。
So that's one thing that maple systems did really well with easy builder 5000.
他们为按钮提供了很多不同的功能,但你知道我是一个非常简单的人。
They gave the buttons a lot of different functionality but you know me I'm a real simple guy.
我一直用的是瞬间的。
I always used momentary.
这正是我要做的。
So that's exactly what I'm going to do here.
然后我们的标签呢?
And then what about our label.
我将使用一个标签,该标签的内容才刚刚开始。
I'm going to use a label and the content of that label is just going to be start.
我喜欢保持简单。
I like to keep it real simple.
让我们继续并点击“确定”。
And let's go ahead and hit OK.
既然我们已经得到了它,我就把它放在屏幕的左上角。
And I'm just going to drop that right up here kind of in the top left of my screen now that we've got that.
让我们检查一下这个东西是否准备好进行通信。
Let's check and see if this thing's ready to communicate.
应该如此。
And it should be.
因此,我们将使用在线模拟工具在我的面板中弹出我们漂亮的小工具。
So we're going to go to tools online simulation pops up our nice little in my panel.
然后让我们继续看看是否可以在后台获得这种可见性,因为我想看看当我按下此按钮时系统是否开始运行。
And then let's go ahead and see if we can get this kind of visible in the background because I want to see if the system starts running when I push this button.
那么我们开始吧。
So here we go.
果然我看到系统开始通电,我们现在正在运行。
And sure enough I saw system start to energize and we are now running.
当我切换此位时,您可以在左侧看到系统启动。
And when I toggle this bit you can see over on the left system start.
当我按下按钮时,按钮会通电和断电。
Push button is energizing and de-energized in with my press.
所以我们有沟通。
So we have communication.
现在让我们继续,右键单击并退出这里,我们还想学习如何发送单词。
Now let's go ahead and right click and exit out of here and we're also going to want to learn how to send in a word.
因此,我们想要发送某种模拟信号,我将像上次一样,手动设置我的帐篷水平。
So we want to send in some kind of analog and I'm going to do what I did last time and just manually set my tent level.
因此,让我们进入 I-O 并向下滚动滚动到我们的电平转换器,其原始值是 10 2。
So let's go into our I-O and scroll scroll scroll down here to our level translator and the raw value coming in for that is an 10 2.
因此,让我们继续设置原始罐输入。
So let's go ahead and set our raw tank input.
因此,我们需要做的第一件事是为新的级别创建一个标签,我们将此级别称为原始级别。
So the first thing we need to do is we need to create a tag for that new and we will call this level raw.
所以这将存储在我们的 PLCC 上。
So that's going to be stored on our PLCC.
就这么一句话。
That's a word.
这将是 n 10,地址是 0 0 2。
And that's going to be n 10 and the address is 0 0 2.
所以我们可以点击“确定”并点击“退出”,然后让我们来到这里讨论对象。
So we can hit OK and hit exit and then let's come up here to objects.
我们要取一个数字。
We're going to take a numeric.
所以这将是艾伦布拉德利的。
So this is going to be for Allen Bradley.
让我们继续单击“设置”,然后单击“标签库”。
Let's go ahead and click Settings and click tag library.
这里我们已经得到了原始的关卡。
And here we've got our level raw.
就像这样我们就点击“确定”。
So just like that we'll hit OK.
这就是我们的读取地址。
And that's our read address.
这就是 Gnumeric 将在屏幕上显示的内容。
So that's what this Gnumeric is going to be displaying on the screen.
所以现在我们要确保我们启用了允许输入,因为我们肯定希望能够发送信号而不仅仅是在此处显示它们。
So now we've got that we want to make sure we have allow input enabled because we definitely want to able to send signals in not just display them here.
那么我们唯一能做的就是其他事情了。
Then the only other thing we can do.
我们过来检查一下数字格式。
Let's come over here and check numeric format.
我们必须在这里设置什么。
And what are we have to set up here.
好吧,我们要确保我们设置为 16 位无符号。
Well we want to make sure that we were set on 16 bit unsigned.
所以这样就可以了。
So that's fine for that.
那么我们有小数点左边的几位数字。
Then we have a number of digits left of the decimal point.
我们将继续取五位数字,然后小数点右边将是 0,因为我们当然在这里使用整数。
We'll go ahead and take five digits and then right of the decimal point is going to be 0 because of course we're working with an integer here.
我们的 PLCC 低,PLCC 高。
Our PLCC low and PLCC high.
让我们继续将其设置为 16 383,因为这是我们正在使用的级别。我们正在对该原始值使用缩放。
Let's go ahead and set that to 16 383 because that's the level that we're using We're using the scaling on that raw value.
然后我们继续点击“确定”。
And then let's go ahead and hit OK.
我会把它放到这里,然后我会把它延伸一点。
And I will drop this in right up here and then I'm just going to stretch it out a little bit.
那么让我们检查一下这个事情。
So let's check this thing out.
让我们拿出工具并单击在线模拟,然后我将拉高我们身后的水箱液位,以便我们在查看屏幕时可以实际看到它并进行检查。
Let's come up to tools and click online simulation and then I'm going to pull up our tank level behind us so that we can actually see it while we're looking at the screen and check that out.
它正在改变。
It's changing.
我们有一个很好的显示屏,它准确地向我们显示了输入的值。
We've got a good display and it's showing us exactly the value over here on input.
完美的。
Perfect.
现在我们来看看为什么我认为 Maple 的 systems easy builder 5000 有点奇怪。
Now then we're going to see why I think Maple's systems easy builder 5000 is a little bit strange.
我将尝试更改此值,因此当我单击此值时。
I'm going to try to change this value so when I click on this.
嗯,这就是我得到的。
Well this is what I get.
我得到一些弹出的空白屏幕,我希望有一个输入表格,我实际上可以在其中写一些数字,但这不是我得到的。
I get some empty screen that pops up and I would expect an entry form where I could actually write some numbers and that's not what I get.
我得到这个空白的屏幕,因为显然我需要创建自己的数字输入表单,但它还没有为我完成,我已经得到了这个,我可以点击它,而且真的没有出路。
I get this blank empty screen because apparently I need to create my own numeric entry form it's not already done for me and I've got this and I can click on it and there's really no way out.
所以此时我们只需要退出模拟,然后返回到 Easy Builder。
So at this point we just need to exit simulation and then let's come back into easy builder.
您会看到我们这里有两个不同的键盘。
And you see we've got two different key pads here.
我们有一个整数。
We've got one for integer.
我们有一个浮动中位数和一个小键盘。
We've got one for floating median and got a small keypad.
这给了我们一些选择。
This gives us some choices.
每当我们点击这个条目这个数字时,我们就可以进入数据输入,您可以在此处看到我们可以选择要使用的键盘之一。
Whenever we click on this entry this numeric we can go into data entry and you see here we've got a choice of which one of these keypads that we want to use.
好吧,我们已经设置为整数了。
Well we're already set up on integer.
因为我们输入的是一个有意义的整数,所以我可以从这里取消。
So since we're entering an integer that makes sense so I can cancel out of here.
让我们提取这个键盘整数。
Let's pull up this key pad integer.
现在我们需要创建自己的键盘,这真的很奇怪,而且真的很麻烦。
And now we are going to need to create our own keypad which is really strange and really kind of a pain in the butt.
还有那些简单的建造者 5000 个特质之一,我对此并不着迷。
And one of those easy builder 5000 idiosyncrasies which I'm not crazy about.
那么让我们来讨论一下对象。
So let's come up here to objects.
按钮我们将采用功能键。
Buttons we're going to take a function key.
在这种情况下,您需要一个 ascii unicode,这就是我们要创建数字键的地方。
In this case where you want an ascii unicode and this is where we're going to create our number keys.
因此,对于标签,我将继续使用该标签,然后放入一个标签,然后单击“确定”,然后将其放在屏幕上的某个位置。
So for a label I'll go ahead and use that label and I'll just put in a one and hit OK and drop this somewhere on my screen.
显然这有点大,所以我会将其缩小。
And obviously that's a little bit big so I'll make it smaller.
现在我有了一把一键钥匙。
And now I've got a one key.
那不是很好吗。
Isn't that nice.
让我们继续复制此内容,我将粘贴三四五六七八九零。
Let's go ahead and copy this and I'll just paste three four five six seven eight nine zero.
好的,我有 10 个这样的数字键,然后我将它们放在我的屏幕上,你可以看出我对这些东西的放置并不是非常挑剔,所以它们不需要看起来很棒。
OK so I've got 10 of these number keys and then I'm just going to place them on my screen and you can tell I'm not being super picky about the placement of these things so they don't need to look great.
我只是想让它们出现在屏幕上,我会稍微改变一下它们,让它们成为不同的数字,看起来也像不同的数字,但现在让我们把它们放在一个网格中来使用。
I just kind of want them to be on the screen and I will change these and a little bit to actually make them be the different numbers and looked like the different numbers but for right now let's just get them in something of a grid to work with.
好的。
All right.
这是我的 10 个号码。
Those are my 10 numbers.
然后让我们继续并开始改变这些。
And then let's go ahead and start changing those.
所以这也将是 ascii unicode,标签为 2,这里我们有 ascii unicode 3,标签为 3。
So this is going to be ascii unicode too with the label of two here we've got ascii unicode three label three.
然后我会快进,这样你就不必看着这一切完成。
And then I'll just fast forward so you don't have to watch all of this done.
好的。
OK.
现在我们已经设置了 10 个号码。
Now we've got our 10 numbers set up.
我们还想要什么。
And what else do we want.
让我们回到这里的对象按钮并拉动另一个功能键。
Let's come back up here into objects button and pull another function key.
和这个。
And this one.
让我们继续给自己一个完整的标签,我们称之为茶。
Let's go ahead and give ourselves an entire and label we'll call that even tea.
这对于输入来说已经足够了,我们将把它放在这里,然后让我们再给自己一个可能性,一旦我们进入这里,你确定我们将使用另一个功能键,这一次让我们继续,创建一个退出键,以防万一我们想改变主意并在不做任何更改的情况下离开那里,我们将称该为 EMC 负责人。
That's good enough for enter and we'll drop that down right here and then let's give ourselves one more possibility once we're inside of here you're sure we're going to take another function key and this time let's just go ahead and create an escape key in case we want to just change our minds and get out of there without changing anything and we'll just call that EMC head.
好的。
OK.
我们就在这里放弃它。
And we will drop that right here.
所以现在我认为我们有一个功能齐全的键盘用于输入整数值,并且所有东西都没有装扮并捕捉到捕捉点并且很漂亮,但是现在没关系,我们实际上只是试图将数字输入到我们的 PLCC 中。
So now I think we have a fully functional keypad for entering in integer values and everything isn't dressed up and snapped to the snap points and beautiful but that's OK right now we're really just trying to get a numeric entry into our PLCC.
让我们再次使用在线模拟的工具。
Once again let's come up to tools go to online simulation.
我将在后台启动我的 APRC 程序,现在看看我们已经有了键盘。
I'm going to pull up my APRC program in the background and now look at that we've got our key pad.
我将输入值 4000 并按回车键,果然我们可以看到我们确实将 CS 坦克液位原始输入值降低到了 4000,并且从那里开始不断下降。
I'm going to type of value of 4000 and hit enter and sure enough we can see that we did drop our CS tank level raw input value down to 4000 and it kept going down from there.
必须创建自己的数字键盘真是太痛苦了。
What a total pain is that having to create your own numeric keypad.
这只是为了输入整数值,然后我们需要为浮点值创建另一个键盘,我们甚至可以有一个可选的小键盘,这样我们就可以根据需要创建我们自己的键盘。
And that's just for entering integer values then we would need to create another one for float values and we could even have an optional small one so we can create our own keypads at pretty much as many as we want.
然后我将它们与我们认为合适的控件关联起来。
And then I associate them with the controls as we see fit.
因此,一方面,这是一件好事,因为这给了我们很大的灵活性,说 Chimay 非常专业,但如果他们已经为我们填充了这一点,我们真的不需要经历,我们会不会喜欢它这很麻烦,因为对于我们大多数人来说,您知道您可以给我们一个标准键盘,我们会很高兴。
So on one hand that's a good thing because that gives us a lot of flexibility on this say Chimay that's pretty pro but man wouldn't we love it if they had just already populated that for us and we really didn't have to go through that trouble because for most of us you know you can give us a standard keypad and we're going to be happy.
所以我的意思是,您知道存在一些权衡,并且枫木系统确实可以为我们提供一个键盘模板作为开始。
So I mean you know there's some tradeoff and there you are maple systems could have really given us a keypad template to start with.
但无论如何,这就是本次讲座的内容。
But anyway that's it for this lecture.
我们现在可以发送比特。
We can now send in bits.
我们现在可以发送文字,在下一节中我们将讨论一些显示。
We can now send in words and in the next section we're going to look at displaying a little bit.
所以嘿,请继续关注。
So hey stay tuned.
那一会儿见。
I'll see you then.
干杯
Cheers